<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Fn(setting) {
            
        }
        // 原型添加方法的简化  extends
        Fn.prototype.extends = function (obj) {
            for (const i in obj) {
                if (!(i in Fn.prototype)) {
                    Fn.prototype[i] = obj[i]
                }
            }
        }
        Fn.prototype.extends({
            name: '李白',
            age: 30
        })

        new Fn();
    </script>
</body>
</html>